<template>
  <div>
    <el-table
      :data="eqmaintainList"
      stripe
      style="width: 100%"
      @selection-change="handleSelectionChange"
    >
      <el-table-column type="selection" width="55" v-if="!ismanager"></el-table-column>
      <el-table-column type="index" label="序号" width="50"></el-table-column>
      <el-table-column prop="hash.ep_ename" label="设备名称"></el-table-column>
      <el-table-column prop="hash.scale" label="规格型号"></el-table-column>
      <el-table-column prop="hash.managenum" label="管理编号"></el-table-column>
      <el-table-column prop="hash.repair_time" label="维护时间"></el-table-column>
      <el-table-column prop="hash.repair_content" label="维护内容"></el-table-column>
      <el-table-column prop="hash.username" label="维护人"></el-table-column>
    </el-table>
    <el-pagination
      @current-change="handleCurrentChange"
      :currentPage.sync="pagobj.currentPage3"
      :pageSize="pagobj.pagesize"
      layout="total, prev, pager, next"
      :total="pagobj.total"
      style="margin:20px 0;text-align:center"
    ></el-pagination>
  </div>
</template>

<script>

import searchperson from '~/components/common/searchperson.vue';
import upload2 from '~/components/common/upload2.vue';

export default {
  components: {
    searchperson,
    upload2,
  },
  props: {
    pagobj: {
      type: Object,
      required: true,
    },
    eqmaintainList: {
      type: Array,
      required: true,
    },
    choosedp: Array,
    ismanager: Boolean,
  },
  data() {
    return {
      ts: this.newStore(),
    };
  },
  methods: {
    handleCurrentChange() {
      console.log(123)
      this.$parent.geteqmaintainList();
    },
    handleSelectionChange(val) {
      this.$emit('update:choosedp', val);
    },
  },
};
</script>
<style >
  .el-form-item {
  width: 50%;
  margin-bottom: 22px;
  float: left;
}
</style>

